package com.sservice.service.service.impl;

import com.sservice.banfu.e.SaleInfo;
import com.sservice.banfu.e.SalePerson;
import com.sservice.banfu.service.SalePersonService1;
import com.sservice.banfu.vo.SalePersonVo;
import com.sservice.base.entity.dto.BaseResult;
import com.sservice.model.entity.Info;
import com.sservice.model.vo.InfoVo;
import com.sservice.service.service.IInfoService;
import com.sservice.service.service.ISalePersonService;
import com.sservice.service.service.IUserWxService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class SalePersonServiceImpl implements ISalePersonService {


    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private SalePersonService1 salePersonService1;
    @Autowired
    private IUserWxService userWxDao;
    @Autowired
    private IInfoService iInfoService;

    @Override
    public List<SalePerson> queryByPage(SalePerson user) {
        return salePersonService1.queryByPage(user);
    }

    @Override
    public SalePerson selectOneById(int id) {
        return salePersonService1.findById(id);
    }

    @Override
    public List<SalePerson> queryByUserIdAndPage(SalePerson user) {
        return salePersonService1.queryByUserIdAndPage(user);
    }

    @Override
    public SalePerson queryUserByPhone(String phone) {
        logger.info("service方法进入----");
        return null;
    }


    @Override
    public int deleteByPrimaryKey(Integer id) {
        return salePersonService1.deleteById(id);
    }

    @Override
    public int insert(SalePerson record) {
        return salePersonService1.save(record);
    }

    @Override
    public int insertSelective(SalePerson record) {
        return salePersonService1.save(record);
    }

    @Override
    public SalePerson selectByPhone(SalePerson user) {
        return salePersonService1.selectByPhone(user);
    }

    @Override
    public SaleInfo selectByOpenid(String openid) {
        return salePersonService1.selectByOpenId(openid);
    }


    @Override
    public int updateByPrimaryKeySelective(SalePerson record) {
        return salePersonService1.update(record);
    }

    @Override
    public List<SalePerson> querySaleManager(SalePersonVo sp) {
        return salePersonService1.querySaleManager(sp);
    }

    @Override
    public int querySaleManagerCount(SalePerson sp) {
        return salePersonService1.querySaleManagerCount(sp);
    }

    @Override
    public int querySaleCashCount(SalePerson user) {
        return salePersonService1.querySaleCashCount(user);
    }

    @Override
    public List<SalePerson> querySaleCashByPage(SalePerson user) {
        return salePersonService1.querySaleCashByPage(user);
    }


    @Override
    public int queryCount(SalePerson user) {
        return salePersonService1.queryCount(user);
    }


}
